using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using DevExpress.Persistent.Validation;
namespace Ascent.QiPei.Module.BusinessObjects.Systems
{
  [DefaultClassOptions]
  [DevExpress.Persistent.Base.NavigationItemAttribute("系统管理")]
  [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("店铺管理")]
  public partial class ShopStore : DevExpress.Persistent.BaseImpl.BaseObject
  {
    private Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryVerification _inventoryVerification;
    private Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryTransfer _inventoryTransfer;
    private System.String _remarks;
    private System.String _telphone;
    private System.String _address;
    private System.String _shopStoreName;
    public ShopStore(DevExpress.Xpo.Session session)
      : base(session)
    {
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("店铺名称")]
    [RuleRequiredField(DefaultContexts.Save)]
    public System.String ShopStoreName
    {
      get
      {
        return _shopStoreName;
      }
      set
      {
        SetPropertyValue("ShopStoreName", ref _shopStoreName, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("地址")]
    public System.String Address
    {
      get
      {
        return _address;
      }
      set
      {
        SetPropertyValue("Address", ref _address, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("联系电话")]
    public System.String Telphone
    {
      get
      {
        return _telphone;
      }
      set
      {
        SetPropertyValue("Telphone", ref _telphone, value);
      }
    }
    [DevExpress.Xpo.AssociationAttribute("Employees-ShopStore")]
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("联系人")]
    public XPCollection<Ascent.QiPei.Module.BusinessObjects.Base.Employee> Employees
    {
      get
      {
        return GetCollection<Ascent.QiPei.Module.BusinessObjects.Base.Employee>("Employees");
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("备注")]
    public System.String Remarks
    {
      get
      {
        return _remarks;
      }
      set
      {
        SetPropertyValue("Remarks", ref _remarks, value);
      }
    }
    [System.ComponentModel.BrowsableAttribute(false)]
    public Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryTransfer InventoryTransfer
    {
      get
      {
        return _inventoryTransfer;
      }
      set
      {
        if (_inventoryTransfer == value)
          return;
        Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryTransfer prevInventoryTransfer = _inventoryTransfer;
        _inventoryTransfer = value;
        if (IsLoading)
          return;
        if (prevInventoryTransfer != null && prevInventoryTransfer.ExportShopStore == this)
          prevInventoryTransfer.ExportShopStore = null;
        if (_inventoryTransfer != null)
          _inventoryTransfer.ExportShopStore = this;
        OnChanged("InventoryTransfer");
      }
    }
    [System.ComponentModel.BrowsableAttribute(false)]
    public Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryVerification InventoryVerification
    {
      get
      {
        return _inventoryVerification;
      }
      set
      {
        if (_inventoryVerification == value)
          return;
        Ascent.QiPei.Module.BusinessObjects.Inventory.InventoryVerification prevInventoryVerification = _inventoryVerification;
        _inventoryVerification = value;
        if (IsLoading)
          return;
        if (prevInventoryVerification != null && prevInventoryVerification.ShopStore == this)
          prevInventoryVerification.ShopStore = null;
        if (_inventoryVerification != null)
          _inventoryVerification.ShopStore = this;
        OnChanged("InventoryVerification");
      }
    }
  }
}
